import request from '@/utils/request'

export function getDoctorData(sort_key, sort_val, page = 1, per_page = 5, class_id, area) {
  if (area) {
    return request({
      url: `/doctor/list`,
      method: 'get',
      params: {
        sort_key,
        sort_val,
        page,
        per_page,
        class_id,
        area
      }
    })
  } else {
    return request({
      url: `/doctor/list`,
      method: 'get',
      params: {
        sort_key,
        sort_val,
        page,
        per_page,
        class_id
      }
    })
  }
}
